\(\int \frac {a+b \sqrt {x}}{c+d \sqrt {x}} \, dx\) [276]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 49 \[ \int \frac {a+b \sqrt {x}}{c+d \sqrt {x}} \, dx=-\frac {2 (b c-a d) \sqrt {x}}{d^2}+\frac {b x}{d}+\frac {2 c (b c-a d) \log \left (c+d \sqrt {x}\right )}{d^3} \]

[Out]

b*x/d+2*c*(-a*d+b*c)*ln(c+d*x^(1/2))/d^3-2*(-a*d+b*c)*x^(1/2)/d^2

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {383, 78} \[ \int \frac {a+b \sqrt {x}}{c+d \sqrt {x}} \, dx=\frac {2 c (b c-a d) \log \left (c+d \sqrt {x}\right )}{d^3}-\frac {2 \sqrt {x} (b c-a d)}{d^2}+\frac {b x}{d} \]

[In]

Int[(a + b*Sqrt[x])/(c + d*Sqrt[x]),x]

[Out]

(-2*(b*c - a*d)*Sqrt[x])/d^2 + (b*x)/d + (2*c*(b*c - a*d)*Log[c + d*Sqrt[x]])/d^3

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 383

Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> With[{g = Denominator[n]}, Dis
t[g, Subst[Int[x^(g - 1)*(a + b*x^(g*n))^p*(c + d*x^(g*n))^q, x], x, x^(1/g)], x]] /; FreeQ[{a, b, c, d, p, q}
, x] && NeQ[b*c - a*d, 0] && FractionQ[n]

Rubi steps \begin{align*} \text {integral}& = 2 \text {Subst}\left (\int \frac {x (a+b x)}{c+d x} \, dx,x,\sqrt {x}\right ) \\ & = 2 \text {Subst}\left (\int \left (\frac {-b c+a d}{d^2}+\frac {b x}{d}+\frac {c (b c-a d)}{d^2 (c+d x)}\right ) \, dx,x,\sqrt {x}\right ) \\ & = -\frac {2 (b c-a d) \sqrt {x}}{d^2}+\frac {b x}{d}+\frac {2 c (b c-a d) \log \left (c+d \sqrt {x}\right )}{d^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.04 \[ \int \frac {a+b \sqrt {x}}{c+d \sqrt {x}} \, dx=\frac {\left (-2 b c+2 a d+b d \sqrt {x}\right ) \sqrt {x}}{d^2}+\frac {2 c (b c-a d) \log \left (c+d \sqrt {x}\right )}{d^3} \]

[In]

Integrate[(a + b*Sqrt[x])/(c + d*Sqrt[x]),x]

[Out]

((-2*b*c + 2*a*d + b*d*Sqrt[x])*Sqrt[x])/d^2 + (2*c*(b*c - a*d)*Log[c + d*Sqrt[x]])/d^3

Maple [A] (verified)

Time = 3.92 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.98

method result size
derivativedivides \(\frac {b d x +2 a d \sqrt {x}-2 b c \sqrt {x}}{d^{2}}-\frac {2 \left (a d -b c \right ) c \ln \left (c +d \sqrt {x}\right )}{d^{3}}\) \(48\)
default \(\frac {b d x +2 a d \sqrt {x}-2 b c \sqrt {x}}{d^{2}}-\frac {2 \left (a d -b c \right ) c \ln \left (c +d \sqrt {x}\right )}{d^{3}}\) \(48\)

[In]

int((a+b*x^(1/2))/(c+d*x^(1/2)),x,method=_RETURNVERBOSE)

[Out]

2/d^2*(1/2*b*d*x+a*d*x^(1/2)-b*c*x^(1/2))-2*(a*d-b*c)*c/d^3*ln(c+d*x^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.98 \[ \int \frac {a+b \sqrt {x}}{c+d \sqrt {x}} \, dx=\frac {b d^{2} x + 2 \, {\left (b c^{2} - a c d\right )} \log \left (d \sqrt {x} + c\right ) - 2 \, {\left (b c d - a d^{2}\right )} \sqrt {x}}{d^{3}} \]

[In]

integrate((a+b*x^(1/2))/(c+d*x^(1/2)),x, algorithm="fricas")

[Out]

(b*d^2*x + 2*(b*c^2 - a*c*d)*log(d*sqrt(x) + c) - 2*(b*c*d - a*d^2)*sqrt(x))/d^3

Sympy [A] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.67 \[ \int \frac {a+b \sqrt {x}}{c+d \sqrt {x}} \, dx=\begin {cases} - \frac {2 a c \log {\left (\frac {c}{d} + \sqrt {x} \right )}}{d^{2}} + \frac {2 a \sqrt {x}}{d} + \frac {2 b c^{2} \log {\left (\frac {c}{d} + \sqrt {x} \right )}}{d^{3}} - \frac {2 b c \sqrt {x}}{d^{2}} + \frac {b x}{d} & \text {for}\: d \neq 0 \\\frac {a x + \frac {2 b x^{\frac {3}{2}}}{3}}{c} & \text {otherwise} \end {cases} \]

[In]

integrate((a+b*x**(1/2))/(c+d*x**(1/2)),x)

[Out]

Piecewise((-2*a*c*log(c/d + sqrt(x))/d**2 + 2*a*sqrt(x)/d + 2*b*c**2*log(c/d + sqrt(x))/d**3 - 2*b*c*sqrt(x)/d
**2 + b*x/d, Ne(d, 0)), ((a*x + 2*b*x**(3/2)/3)/c, True))

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.96 \[ \int \frac {a+b \sqrt {x}}{c+d \sqrt {x}} \, dx=\frac {b d x - 2 \, {\left (b c - a d\right )} \sqrt {x}}{d^{2}} + \frac {2 \, {\left (b c^{2} - a c d\right )} \log \left (d \sqrt {x} + c\right )}{d^{3}} \]

[In]

integrate((a+b*x^(1/2))/(c+d*x^(1/2)),x, algorithm="maxima")

[Out]

(b*d*x - 2*(b*c - a*d)*sqrt(x))/d^2 + 2*(b*c^2 - a*c*d)*log(d*sqrt(x) + c)/d^3

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.00 \[ \int \frac {a+b \sqrt {x}}{c+d \sqrt {x}} \, dx=\frac {b d x - 2 \, b c \sqrt {x} + 2 \, a d \sqrt {x}}{d^{2}} + \frac {2 \, {\left (b c^{2} - a c d\right )} \log \left ({\left | d \sqrt {x} + c \right |}\right )}{d^{3}} \]

[In]

integrate((a+b*x^(1/2))/(c+d*x^(1/2)),x, algorithm="giac")

[Out]

(b*d*x - 2*b*c*sqrt(x) + 2*a*d*sqrt(x))/d^2 + 2*(b*c^2 - a*c*d)*log(abs(d*sqrt(x) + c))/d^3

Mupad [B] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.00 \[ \int \frac {a+b \sqrt {x}}{c+d \sqrt {x}} \, dx=\sqrt {x}\,\left (\frac {2\,a}{d}-\frac {2\,b\,c}{d^2}\right )+\frac {\ln \left (c+d\,\sqrt {x}\right )\,\left (2\,b\,c^2-2\,a\,c\,d\right )}{d^3}+\frac {b\,x}{d} \]

[In]

int((a + b*x^(1/2))/(c + d*x^(1/2)),x)

[Out]

x^(1/2)*((2*a)/d - (2*b*c)/d^2) + (log(c + d*x^(1/2))*(2*b*c^2 - 2*a*c*d))/d^3 + (b*x)/d